<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>netLink C++ 11: include/Socket.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">netLink C++ 11
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">Socket.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">    netLink: c++ 11 networking library</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">    Copyright (C) 2013-2023 Alexander Meißner</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"></span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment">    This program is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment">    it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment">    the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment">    (at your option) any later version.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"></span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment">    This program is distributed in the hope that it will be useful,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment">    GNU General Public License for more details.</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment"></span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment">    You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment">    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment">*/</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &quot;Core.h&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="keyword">namespace </span>netLink {</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span>    <span class="keyword">class </span>SocketManager;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html">   28</a></span>    <span class="keyword">class </span><a class="code hl_class" href="classnet_link_1_1_socket.html">Socket</a> : <span class="keyword">public</span> std::streambuf {</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>        <span class="keyword">typedef</span> std::streambuf super; </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>        <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="classnet_link_1_1_socket_manager.html">SocketManager</a>;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>        <span class="keyword">struct </span>AddrinfoDestructor {</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>            AddrinfoDestructor() { };</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>            <span class="keywordtype">void</span> operator() (<span class="keyword">struct</span> addrinfo* res)<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>                freeaddrinfo(res);</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>            }</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>        };</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>        <span class="keyword">typedef</span> std::unique_ptr&lt;struct addrinfo, AddrinfoDestructor&gt; AddrinfoContainer;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>        AddrinfoContainer getSocketInfoFor(<span class="keyword">const</span> <span class="keywordtype">char</span>* host, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> port, <span class="keywordtype">bool</span> wildcardAddress);</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>        <span class="comment">//Buffer management and positioning</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>        pos_type seekoff(off_type off, std::ios_base::seekdir way, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out);</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>        pos_type seekpos(pos_type sp, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out);</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>        <span class="keywordtype">int</span> sync();</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>        <span class="comment">//Input functions (get)</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>        std::streamsize inputIntermediateSize;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>        std::streamsize xsgetn(char_type* buffer, std::streamsize size);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>        int_type underflow();</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>        <span class="comment">//Output functions (put)</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>        std::streamsize xsputn(<span class="keyword">const</span> char_type* buffer, std::streamsize size);</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>        int_type overflow(int_type c = -1);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>        std::streamsize advanceInputBuffer();</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>        <span class="keyword">public</span>:</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032ee">   65</a></span>        <span class="keyword">enum</span> <a class="code hl_enumeration" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032ee">IPVersion</a> {</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea385f5ac57a81928cbf1c7945187f9269">   66</a></span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea385f5ac57a81928cbf1c7945187f9269">IPv4</a>, </div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea2cbc81b132e8fbb338add273608e8f16">   67</a></span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea2cbc81b132e8fbb338add273608e8f16">IPv6</a>, </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea83ab5791fd32774ace37844076e133d8">ANY</a> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea83ab5791fd32774ace37844076e133d8">   69</a></span>        };</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53ed">   72</a></span>        <span class="keyword">enum</span> <a class="code hl_enumeration" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53ed">Type</a> {</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda8a060efa49fd569c2ee7599c928b7199">   73</a></span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda8a060efa49fd569c2ee7599c928b7199">NONE</a>, </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda5d0cd45a6d8e13841f930edcbce08c17">   74</a></span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda5d0cd45a6d8e13841f930edcbce08c17">TCP_CLIENT</a>, </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53edadf788f3c0b9c907d41bee0f9cce54811">   75</a></span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53edadf788f3c0b9c907d41bee0f9cce54811">TCP_SERVER</a>, </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53edad3600deea9cb8f766608ca663a5e5927">   76</a></span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53edad3600deea9cb8f766608ca663a5e5927">TCP_SERVERS_CLIENT</a>, </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda5dba91b6b6d82a48625f2f122ae9685f">UDP_PEER</a> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda5dba91b6b6d82a48625f2f122ae9685f">   78</a></span>        };</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292e">   81</a></span>        <span class="keyword">enum</span> <a class="code hl_enumeration" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292e">Status</a> {</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292eae3bde61fcdbe3347ca8c17d80a37e0de">   82</a></span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292eae3bde61fcdbe3347ca8c17d80a37e0de">NOT_CONNECTED</a>, </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea8eb8f577e20bf7765a4e7cfcc2adeac7">   83</a></span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea8eb8f577e20bf7765a4e7cfcc2adeac7">CONNECTING</a>, </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292eaaf33c30de155cb6e92fb1f9b3f45f4ab">   84</a></span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292eaaf33c30de155cb6e92fb1f9b3f45f4ab">LISTENING</a>, </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea1ab5bfd990fb958919b9dcac41c5a73f">   85</a></span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea1ab5bfd990fb958919b9dcac41c5a73f">READY</a>, </div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>            <a class="code hl_enumvalue" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea0c9ded3ba9273962cf2cdc063d1a5481">BUSY</a> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea0c9ded3ba9273962cf2cdc063d1a5481">   87</a></span>        };</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span> </div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>        <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#aac1c17565a586bbff36ae95d5f00d4f3">   90</a></span>        <a class="code hl_enumeration" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032ee">IPVersion</a> <a class="code hl_variable" href="classnet_link_1_1_socket.html#aac1c17565a586bbff36ae95d5f00d4f3">ipVersion</a>; </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#ac75a94d671b640640567a71f6a45fc12">   91</a></span>        <a class="code hl_enumeration" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53ed">Type</a> <a class="code hl_variable" href="classnet_link_1_1_socket.html#ac75a94d671b640640567a71f6a45fc12">type</a>; </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a073f10822632d93167ecd56f7779d893">   92</a></span>        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classnet_link_1_1_socket.html#a073f10822632d93167ecd56f7779d893">status</a>; </div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#ae2da58e9b7c61f78aaad7675ba6b8d80">   93</a></span>        <span class="keywordtype">int</span> <a class="code hl_variable" href="classnet_link_1_1_socket.html#ae2da58e9b7c61f78aaad7675ba6b8d80">handle</a>; </div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#a2bfbb3d0188794023985874d08627e80">initSocket</a>(<span class="keywordtype">bool</span> blocking);</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a3d1495674002a06ef1c1ae68e9da99c4">   99</a></span>        <span class="keyword">virtual</span> std::shared_ptr&lt;Socket&gt; <a class="code hl_function" href="classnet_link_1_1_socket.html#a3d1495674002a06ef1c1ae68e9da99c4">SocketFactory</a>() {</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>            <span class="keywordflow">return</span> std::shared_ptr&lt;Socket&gt;(<span class="keyword">new</span> <a class="code hl_class" href="classnet_link_1_1_socket.html">Socket</a>());</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>        }</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>        <span class="keyword">public</span>:</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a6c9c8a24279538cd7e82556329d97e4d">  104</a></span>        std::set&lt;std::shared_ptr&lt;Socket&gt;&gt; <a class="code hl_variable" href="classnet_link_1_1_socket.html#a6c9c8a24279538cd7e82556329d97e4d">clients</a>; </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a0c33dad2df50e579373db5f1de32789b">  105</a></span>        std::string <a class="code hl_variable" href="classnet_link_1_1_socket.html#a0c33dad2df50e579373db5f1de32789b">hostLocal</a>, </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a956e599cb177baf7f24f3cea2f5a475b">  106</a></span>                    <a class="code hl_variable" href="classnet_link_1_1_socket.html#a956e599cb177baf7f24f3cea2f5a475b">hostRemote</a>; </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#a5f595f82acb8d2c13ffd53e48346a53f">  107</a></span>        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classnet_link_1_1_socket.html#a5f595f82acb8d2c13ffd53e48346a53f">portLocal</a>, </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="classnet_link_1_1_socket.html#af16d02ebbad7e45dce6a68f3e60cb89d">  108</a></span>                     <a class="code hl_variable" href="classnet_link_1_1_socket.html#af16d02ebbad7e45dce6a68f3e60cb89d">portRemote</a>; </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#a571f756f8aa4f199cc7cc8db313bde98">initAsTcpClient</a>(<span class="keyword">const</span> std::string&amp; <a class="code hl_variable" href="classnet_link_1_1_socket.html#a956e599cb177baf7f24f3cea2f5a475b">hostRemote</a>, <span class="keywordtype">unsigned</span> <a class="code hl_variable" href="classnet_link_1_1_socket.html#af16d02ebbad7e45dce6a68f3e60cb89d">portRemote</a>, <span class="keywordtype">bool</span> waitUntilConnected = <span class="keyword">false</span>);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span> </div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#a477d9c082e3c7636bb7e103e8d617e11">initAsTcpServer</a>(<span class="keyword">const</span> std::string&amp; <a class="code hl_variable" href="classnet_link_1_1_socket.html#a0c33dad2df50e579373db5f1de32789b">hostLocal</a>, <span class="keywordtype">unsigned</span> <a class="code hl_variable" href="classnet_link_1_1_socket.html#a5f595f82acb8d2c13ffd53e48346a53f">portLocal</a>, <span class="keywordtype">unsigned</span> listenQueue = 16);</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span> </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#a579fee22b3df524283e0462f0ce4eb6a">initAsUdpPeer</a>(<span class="keyword">const</span> std::string&amp; <a class="code hl_variable" href="classnet_link_1_1_socket.html#a0c33dad2df50e579373db5f1de32789b">hostLocal</a>, <span class="keywordtype">unsigned</span> <a class="code hl_variable" href="classnet_link_1_1_socket.html#a5f595f82acb8d2c13ffd53e48346a53f">portLocal</a>);</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>        <a class="code hl_class" href="classnet_link_1_1_socket.html">Socket</a>();</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>        <span class="keyword">virtual</span> <a class="code hl_class" href="classnet_link_1_1_socket.html">~Socket</a>();</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span> </div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>        <a class="code hl_enumeration" href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032ee">IPVersion</a> <a class="code hl_function" href="classnet_link_1_1_socket.html#a0007fa1cf09e1d324a40740460f975e9">getIPVersion</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span> </div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>        <a class="code hl_enumeration" href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53ed">Type</a> <a class="code hl_function" href="classnet_link_1_1_socket.html#a904a83ca162708b193be85c9b310cba7">getType</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>        <a class="code hl_enumeration" href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292e">Status</a> <a class="code hl_function" href="classnet_link_1_1_socket.html#a5ab9daab65cd5f2f0402c46785858024">getStatus</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span> </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>        std::streamsize <a class="code hl_function" href="classnet_link_1_1_socket.html#a45b84b56d91ba13f163e27c8a5f5b5d7">showmanyc</a>();</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>        std::streamsize <a class="code hl_function" href="classnet_link_1_1_socket.html#a37881f83ff1b3e38033ac11896a8121c">receive</a>(char_type* buffer, std::streamsize size);</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span>        std::streamsize <a class="code hl_function" href="classnet_link_1_1_socket.html#a030ae9949ab2d23ece036dac7aae42d4">send</a>(<span class="keyword">const</span> char_type* buffer, std::streamsize size);</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>        std::streamsize <a class="code hl_function" href="classnet_link_1_1_socket.html#a3816a9a6221d3007a78e4d21e24f6166">redirect</a>(<span class="keyword">const</span> std::vector&lt;std::shared_ptr&lt;Socket&gt;&gt;&amp; destinations);</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span> </div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>        std::streamsize <a class="code hl_function" href="classnet_link_1_1_socket.html#a2a160f1b17b2591bd5b0f0f4799d1605">getInputBufferSize</a>();</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>        std::streamsize <a class="code hl_function" href="classnet_link_1_1_socket.html#af992596ec1a9f0fd75b333729fc199a0">getOutputBufferSize</a>();</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#ab4b53976793d839ae1d09278e8cfcd2e">setInputBufferSize</a>(std::streamsize size);</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#a39727b2cb0245111f492cc21bc622827">setOutputBufferSize</a>(std::streamsize size);</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span> </div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#a7f19bae6289683c2f41084db0989155b">setBlockingMode</a>(<span class="keywordtype">bool</span> blocking);</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#a19b1ff35f08e984080e80d24db94b989">setBroadcast</a>(<span class="keywordtype">bool</span> active);</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#ab8aea124f7c80dcc802fb60fef34523a">setMulticastGroup</a>(<span class="keyword">const</span> std::string&amp; address, <span class="keywordtype">bool</span> join);</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span>        std::shared_ptr&lt;Socket&gt; <a class="code hl_function" href="classnet_link_1_1_socket.html#a4bfd52a5caebfc57f459754885160bcc">accept</a>();</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#ac078338471cceaa79e6dbfac1926cf59">disconnect</a>();</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="classnet_link_1_1_socket.html#a2ca18424fecd2dfdf3f6e5a0c750fd5f">disconnectOnError</a>();</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span>    };</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span> </div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span>};</div>
<div class="ttc" id="aclassnet_link_1_1_socket_html"><div class="ttname"><a href="classnet_link_1_1_socket.html">netLink::Socket</a></div><div class="ttdoc">Socket and stream buffer.</div><div class="ttdef"><b>Definition</b> Socket.h:28</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a0007fa1cf09e1d324a40740460f975e9"><div class="ttname"><a href="classnet_link_1_1_socket.html#a0007fa1cf09e1d324a40740460f975e9">netLink::Socket::getIPVersion</a></div><div class="ttdeci">IPVersion getIPVersion() const</div><div class="ttdoc">Returns the IPVersion of the socket.</div><div class="ttdef"><b>Definition</b> Socket.cpp:329</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a030ae9949ab2d23ece036dac7aae42d4"><div class="ttname"><a href="classnet_link_1_1_socket.html#a030ae9949ab2d23ece036dac7aae42d4">netLink::Socket::send</a></div><div class="ttdeci">std::streamsize send(const char_type *buffer, std::streamsize size)</div><div class="ttdef"><b>Definition</b> Socket.cpp:416</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a073f10822632d93167ecd56f7779d893"><div class="ttname"><a href="classnet_link_1_1_socket.html#a073f10822632d93167ecd56f7779d893">netLink::Socket::status</a></div><div class="ttdeci">unsigned int status</div><div class="ttdoc">Or listen queue size if socket is TCP_SERVER.</div><div class="ttdef"><b>Definition</b> Socket.h:92</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a0c33dad2df50e579373db5f1de32789b"><div class="ttname"><a href="classnet_link_1_1_socket.html#a0c33dad2df50e579373db5f1de32789b">netLink::Socket::hostLocal</a></div><div class="ttdeci">std::string hostLocal</div><div class="ttdoc">Host string of local.</div><div class="ttdef"><b>Definition</b> Socket.h:105</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a19b1ff35f08e984080e80d24db94b989"><div class="ttname"><a href="classnet_link_1_1_socket.html#a19b1ff35f08e984080e80d24db94b989">netLink::Socket::setBroadcast</a></div><div class="ttdeci">void setBroadcast(bool active)</div><div class="ttdef"><b>Definition</b> Socket.cpp:515</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a2a160f1b17b2591bd5b0f0f4799d1605"><div class="ttname"><a href="classnet_link_1_1_socket.html#a2a160f1b17b2591bd5b0f0f4799d1605">netLink::Socket::getInputBufferSize</a></div><div class="ttdeci">std::streamsize getInputBufferSize()</div><div class="ttdoc">Get the size of the input intermediate buffer in bytes.</div><div class="ttdef"><b>Definition</b> Socket.cpp:471</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a2bfbb3d0188794023985874d08627e80"><div class="ttname"><a href="classnet_link_1_1_socket.html#a2bfbb3d0188794023985874d08627e80">netLink::Socket::initSocket</a></div><div class="ttdeci">void initSocket(bool blocking)</div><div class="ttdef"><b>Definition</b> Socket.cpp:193</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a2ca18424fecd2dfdf3f6e5a0c750fd5f"><div class="ttname"><a href="classnet_link_1_1_socket.html#a2ca18424fecd2dfdf3f6e5a0c750fd5f">netLink::Socket::disconnectOnError</a></div><div class="ttdeci">void disconnectOnError()</div><div class="ttdoc">Check if there is a problem with this socket and disconnect in case there is one.</div><div class="ttdef"><b>Definition</b> Socket.cpp:594</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a37881f83ff1b3e38033ac11896a8121c"><div class="ttname"><a href="classnet_link_1_1_socket.html#a37881f83ff1b3e38033ac11896a8121c">netLink::Socket::receive</a></div><div class="ttdeci">std::streamsize receive(char_type *buffer, std::streamsize size)</div><div class="ttdef"><b>Definition</b> Socket.cpp:377</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a3816a9a6221d3007a78e4d21e24f6166"><div class="ttname"><a href="classnet_link_1_1_socket.html#a3816a9a6221d3007a78e4d21e24f6166">netLink::Socket::redirect</a></div><div class="ttdeci">std::streamsize redirect(const std::vector&lt; std::shared_ptr&lt; Socket &gt; &gt; &amp;destinations)</div><div class="ttdef"><b>Definition</b> Socket.cpp:455</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a39727b2cb0245111f492cc21bc622827"><div class="ttname"><a href="classnet_link_1_1_socket.html#a39727b2cb0245111f492cc21bc622827">netLink::Socket::setOutputBufferSize</a></div><div class="ttdeci">void setOutputBufferSize(std::streamsize size)</div><div class="ttdoc">Set the size of the output intermediate buffer in bytes (unwritten contents are lost)</div><div class="ttdef"><b>Definition</b> Socket.cpp:491</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a3d1495674002a06ef1c1ae68e9da99c4"><div class="ttname"><a href="classnet_link_1_1_socket.html#a3d1495674002a06ef1c1ae68e9da99c4">netLink::Socket::SocketFactory</a></div><div class="ttdeci">virtual std::shared_ptr&lt; Socket &gt; SocketFactory()</div><div class="ttdoc">Generates new sockets for client connections of a server.</div><div class="ttdef"><b>Definition</b> Socket.h:99</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a45b84b56d91ba13f163e27c8a5f5b5d7"><div class="ttname"><a href="classnet_link_1_1_socket.html#a45b84b56d91ba13f163e27c8a5f5b5d7">netLink::Socket::showmanyc</a></div><div class="ttdeci">std::streamsize showmanyc()</div><div class="ttdef"><b>Definition</b> Socket.cpp:344</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a477d9c082e3c7636bb7e103e8d617e11"><div class="ttname"><a href="classnet_link_1_1_socket.html#a477d9c082e3c7636bb7e103e8d617e11">netLink::Socket::initAsTcpServer</a></div><div class="ttdeci">void initAsTcpServer(const std::string &amp;hostLocal, unsigned portLocal, unsigned listenQueue=16)</div><div class="ttdef"><b>Definition</b> Socket.cpp:307</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a4bfd52a5caebfc57f459754885160bcc"><div class="ttname"><a href="classnet_link_1_1_socket.html#a4bfd52a5caebfc57f459754885160bcc">netLink::Socket::accept</a></div><div class="ttdeci">std::shared_ptr&lt; Socket &gt; accept()</div><div class="ttdef"><b>Definition</b> Socket.cpp:555</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a571f756f8aa4f199cc7cc8db313bde98"><div class="ttname"><a href="classnet_link_1_1_socket.html#a571f756f8aa4f199cc7cc8db313bde98">netLink::Socket::initAsTcpClient</a></div><div class="ttdeci">void initAsTcpClient(const std::string &amp;hostRemote, unsigned portRemote, bool waitUntilConnected=false)</div><div class="ttdef"><b>Definition</b> Socket.cpp:300</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a579fee22b3df524283e0462f0ce4eb6a"><div class="ttname"><a href="classnet_link_1_1_socket.html#a579fee22b3df524283e0462f0ce4eb6a">netLink::Socket::initAsUdpPeer</a></div><div class="ttdeci">void initAsUdpPeer(const std::string &amp;hostLocal, unsigned portLocal)</div><div class="ttdef"><b>Definition</b> Socket.cpp:315</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a5ab9daab65cd5f2f0402c46785858024"><div class="ttname"><a href="classnet_link_1_1_socket.html#a5ab9daab65cd5f2f0402c46785858024">netLink::Socket::getStatus</a></div><div class="ttdeci">Status getStatus() const</div><div class="ttdoc">Returns the SocketStatus of the socket.</div><div class="ttdef"><b>Definition</b> Socket.cpp:337</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a5f595f82acb8d2c13ffd53e48346a53f"><div class="ttname"><a href="classnet_link_1_1_socket.html#a5f595f82acb8d2c13ffd53e48346a53f">netLink::Socket::portLocal</a></div><div class="ttdeci">unsigned int portLocal</div><div class="ttdoc">Port of local.</div><div class="ttdef"><b>Definition</b> Socket.h:107</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a6c9c8a24279538cd7e82556329d97e4d"><div class="ttname"><a href="classnet_link_1_1_socket.html#a6c9c8a24279538cd7e82556329d97e4d">netLink::Socket::clients</a></div><div class="ttdeci">std::set&lt; std::shared_ptr&lt; Socket &gt; &gt; clients</div><div class="ttdoc">Client sockets of a server.</div><div class="ttdef"><b>Definition</b> Socket.h:104</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a7f19bae6289683c2f41084db0989155b"><div class="ttname"><a href="classnet_link_1_1_socket.html#a7f19bae6289683c2f41084db0989155b">netLink::Socket::setBlockingMode</a></div><div class="ttdeci">void setBlockingMode(bool blocking)</div><div class="ttdef"><b>Definition</b> Socket.cpp:500</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a904a83ca162708b193be85c9b310cba7"><div class="ttname"><a href="classnet_link_1_1_socket.html#a904a83ca162708b193be85c9b310cba7">netLink::Socket::getType</a></div><div class="ttdeci">Type getType() const</div><div class="ttdoc">Returns the SocketType of the socket.</div><div class="ttdef"><b>Definition</b> Socket.cpp:333</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a956e599cb177baf7f24f3cea2f5a475b"><div class="ttname"><a href="classnet_link_1_1_socket.html#a956e599cb177baf7f24f3cea2f5a475b">netLink::Socket::hostRemote</a></div><div class="ttdeci">std::string hostRemote</div><div class="ttdoc">Host string of remote.</div><div class="ttdef"><b>Definition</b> Socket.h:106</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a9757ba19d83716e413fdc2ce324c53ed"><div class="ttname"><a href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53ed">netLink::Socket::Type</a></div><div class="ttdeci">Type</div><div class="ttdoc">Defines the nature of a socket.</div><div class="ttdef"><b>Definition</b> Socket.h:72</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a9757ba19d83716e413fdc2ce324c53eda5d0cd45a6d8e13841f930edcbce08c17"><div class="ttname"><a href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda5d0cd45a6d8e13841f930edcbce08c17">netLink::Socket::TCP_CLIENT</a></div><div class="ttdeci">@ TCP_CLIENT</div><div class="ttdoc">TCP socket connecting to a server.</div><div class="ttdef"><b>Definition</b> Socket.h:74</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a9757ba19d83716e413fdc2ce324c53eda5dba91b6b6d82a48625f2f122ae9685f"><div class="ttname"><a href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda5dba91b6b6d82a48625f2f122ae9685f">netLink::Socket::UDP_PEER</a></div><div class="ttdeci">@ UDP_PEER</div><div class="ttdoc">UDP socket.</div><div class="ttdef"><b>Definition</b> Socket.h:77</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a9757ba19d83716e413fdc2ce324c53eda8a060efa49fd569c2ee7599c928b7199"><div class="ttname"><a href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53eda8a060efa49fd569c2ee7599c928b7199">netLink::Socket::NONE</a></div><div class="ttdeci">@ NONE</div><div class="ttdoc">No type defined.</div><div class="ttdef"><b>Definition</b> Socket.h:73</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a9757ba19d83716e413fdc2ce324c53edad3600deea9cb8f766608ca663a5e5927"><div class="ttname"><a href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53edad3600deea9cb8f766608ca663a5e5927">netLink::Socket::TCP_SERVERS_CLIENT</a></div><div class="ttdeci">@ TCP_SERVERS_CLIENT</div><div class="ttdoc">TCP socket to represent a TCP_CLIENT connection at the TCP_SERVER.</div><div class="ttdef"><b>Definition</b> Socket.h:76</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a9757ba19d83716e413fdc2ce324c53edadf788f3c0b9c907d41bee0f9cce54811"><div class="ttname"><a href="classnet_link_1_1_socket.html#a9757ba19d83716e413fdc2ce324c53edadf788f3c0b9c907d41bee0f9cce54811">netLink::Socket::TCP_SERVER</a></div><div class="ttdeci">@ TCP_SERVER</div><div class="ttdoc">TCP socket waiting for TCP_CLIENT to connect.</div><div class="ttdef"><b>Definition</b> Socket.h:75</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a97d865489970e8bad3122107b819292e"><div class="ttname"><a href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292e">netLink::Socket::Status</a></div><div class="ttdeci">Status</div><div class="ttdoc">Defines the send status of a socket.</div><div class="ttdef"><b>Definition</b> Socket.h:81</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a97d865489970e8bad3122107b819292ea0c9ded3ba9273962cf2cdc063d1a5481"><div class="ttname"><a href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea0c9ded3ba9273962cf2cdc063d1a5481">netLink::Socket::BUSY</a></div><div class="ttdeci">@ BUSY</div><div class="ttdoc">Socket is connected and can not send but receive data (at the moment)</div><div class="ttdef"><b>Definition</b> Socket.h:86</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a97d865489970e8bad3122107b819292ea1ab5bfd990fb958919b9dcac41c5a73f"><div class="ttname"><a href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea1ab5bfd990fb958919b9dcac41c5a73f">netLink::Socket::READY</a></div><div class="ttdeci">@ READY</div><div class="ttdoc">Socket is connected, can send and receive data.</div><div class="ttdef"><b>Definition</b> Socket.h:85</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a97d865489970e8bad3122107b819292ea8eb8f577e20bf7765a4e7cfcc2adeac7"><div class="ttname"><a href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292ea8eb8f577e20bf7765a4e7cfcc2adeac7">netLink::Socket::CONNECTING</a></div><div class="ttdeci">@ CONNECTING</div><div class="ttdoc">Socket is initialized but not connected yet and can not send or receive data.</div><div class="ttdef"><b>Definition</b> Socket.h:83</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a97d865489970e8bad3122107b819292eaaf33c30de155cb6e92fb1f9b3f45f4ab"><div class="ttname"><a href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292eaaf33c30de155cb6e92fb1f9b3f45f4ab">netLink::Socket::LISTENING</a></div><div class="ttdeci">@ LISTENING</div><div class="ttdoc">Socket is a server and can neither send nor receive data.</div><div class="ttdef"><b>Definition</b> Socket.h:84</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_a97d865489970e8bad3122107b819292eae3bde61fcdbe3347ca8c17d80a37e0de"><div class="ttname"><a href="classnet_link_1_1_socket.html#a97d865489970e8bad3122107b819292eae3bde61fcdbe3347ca8c17d80a37e0de">netLink::Socket::NOT_CONNECTED</a></div><div class="ttdeci">@ NOT_CONNECTED</div><div class="ttdoc">Socket is not even initialized or disconnected.</div><div class="ttdef"><b>Definition</b> Socket.h:82</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_aac1c17565a586bbff36ae95d5f00d4f3"><div class="ttname"><a href="classnet_link_1_1_socket.html#aac1c17565a586bbff36ae95d5f00d4f3">netLink::Socket::ipVersion</a></div><div class="ttdeci">IPVersion ipVersion</div><div class="ttdoc">IP version which is in use.</div><div class="ttdef"><b>Definition</b> Socket.h:90</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_ab4b53976793d839ae1d09278e8cfcd2e"><div class="ttname"><a href="classnet_link_1_1_socket.html#ab4b53976793d839ae1d09278e8cfcd2e">netLink::Socket::setInputBufferSize</a></div><div class="ttdeci">void setInputBufferSize(std::streamsize size)</div><div class="ttdoc">Set the size of the input intermediate buffer in bytes (unread contents are lost)</div><div class="ttdef"><b>Definition</b> Socket.cpp:479</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_ab8aea124f7c80dcc802fb60fef34523a"><div class="ttname"><a href="classnet_link_1_1_socket.html#ab8aea124f7c80dcc802fb60fef34523a">netLink::Socket::setMulticastGroup</a></div><div class="ttdeci">void setMulticastGroup(const std::string &amp;address, bool join)</div><div class="ttdef"><b>Definition</b> Socket.cpp:527</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_ac078338471cceaa79e6dbfac1926cf59"><div class="ttname"><a href="classnet_link_1_1_socket.html#ac078338471cceaa79e6dbfac1926cf59">netLink::Socket::disconnect</a></div><div class="ttdeci">void disconnect()</div><div class="ttdoc">Disconnects the socket, deletes the intermediate buffers and sets the handle to -1.</div><div class="ttdef"><b>Definition</b> Socket.cpp:581</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_ac75a94d671b640640567a71f6a45fc12"><div class="ttname"><a href="classnet_link_1_1_socket.html#ac75a94d671b640640567a71f6a45fc12">netLink::Socket::type</a></div><div class="ttdeci">Type type</div><div class="ttdoc">Type of the socket.</div><div class="ttdef"><b>Definition</b> Socket.h:91</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_adffee851ad5d6175260d1a49e9b032ee"><div class="ttname"><a href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032ee">netLink::Socket::IPVersion</a></div><div class="ttdeci">IPVersion</div><div class="ttdoc">Defines the version of IP.</div><div class="ttdef"><b>Definition</b> Socket.h:65</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_adffee851ad5d6175260d1a49e9b032eea2cbc81b132e8fbb338add273608e8f16"><div class="ttname"><a href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea2cbc81b132e8fbb338add273608e8f16">netLink::Socket::IPv6</a></div><div class="ttdeci">@ IPv6</div><div class="ttdoc">IPv6 only.</div><div class="ttdef"><b>Definition</b> Socket.h:67</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_adffee851ad5d6175260d1a49e9b032eea385f5ac57a81928cbf1c7945187f9269"><div class="ttname"><a href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea385f5ac57a81928cbf1c7945187f9269">netLink::Socket::IPv4</a></div><div class="ttdeci">@ IPv4</div><div class="ttdoc">IPv4 only.</div><div class="ttdef"><b>Definition</b> Socket.h:66</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_adffee851ad5d6175260d1a49e9b032eea83ab5791fd32774ace37844076e133d8"><div class="ttname"><a href="classnet_link_1_1_socket.html#adffee851ad5d6175260d1a49e9b032eea83ab5791fd32774ace37844076e133d8">netLink::Socket::ANY</a></div><div class="ttdeci">@ ANY</div><div class="ttdoc">IPv4 or IPv6 (choosen by the system)</div><div class="ttdef"><b>Definition</b> Socket.h:68</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_ae2da58e9b7c61f78aaad7675ba6b8d80"><div class="ttname"><a href="classnet_link_1_1_socket.html#ae2da58e9b7c61f78aaad7675ba6b8d80">netLink::Socket::handle</a></div><div class="ttdeci">int handle</div><div class="ttdoc">Handle used for the system interface.</div><div class="ttdef"><b>Definition</b> Socket.h:93</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_af16d02ebbad7e45dce6a68f3e60cb89d"><div class="ttname"><a href="classnet_link_1_1_socket.html#af16d02ebbad7e45dce6a68f3e60cb89d">netLink::Socket::portRemote</a></div><div class="ttdeci">unsigned int portRemote</div><div class="ttdoc">Port of remote.</div><div class="ttdef"><b>Definition</b> Socket.h:108</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_html_af992596ec1a9f0fd75b333729fc199a0"><div class="ttname"><a href="classnet_link_1_1_socket.html#af992596ec1a9f0fd75b333729fc199a0">netLink::Socket::getOutputBufferSize</a></div><div class="ttdeci">std::streamsize getOutputBufferSize()</div><div class="ttdoc">Get the size of the output intermediate buffer in bytes.</div><div class="ttdef"><b>Definition</b> Socket.cpp:475</div></div>
<div class="ttc" id="aclassnet_link_1_1_socket_manager_html"><div class="ttname"><a href="classnet_link_1_1_socket_manager.html">netLink::SocketManager</a></div><div class="ttdoc">Manages a group of Sockets.</div><div class="ttdef"><b>Definition</b> netLink.h:26</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
</small></address>
</body>
</html>
